Virtualization allows multiplexing of an underlying host machine between different virtual machines. The host computer allocates a certain amount of its resources to each of the virtual machines, including host central processing units (CPUs). Each virtual machine is utilized by a guest to access the allocated resources to execute applications, including operating systems (referred to as guest operating systems). The software layer providing the virtualization is commonly referred to as a hypervisor (also known as a virtual machine monitor (VMM)) executed on a host operating system. The hypervisor emulates the underlying hardware of the host computer, making the use of the virtual machine transparent to the guest operating system and the user of the computer.
The virtual machines may communicate with the hypervisor via one or more queues. The queues may serve as channels for a guest running on a virtual machine to pass requests to the hypervisor for execution by a CPU of the host computer. Certain virtual machine systems may include a single queue for receiving multiple requests from a virtual machine. Such systems may be configured to batch or bundle the requests for communication to the hypervisor via the single queue. When the virtual machine places the requests on the queue, a virtual machine exit is performed which causes a transition of control from the virtual machine to the hypervisor (i.e., the virtual machine stops running in the virtualized mode). However, in many systems there is desire to handle a high load produced by multiple virtual CPUs (VCPUs) of the virtual machine by using multiple queues to communicate with multiple host CPUs for servicing the requests in parallel.
Although the use of multiple queues may be beneficial in handling high loads, the servicing of requests on each of the multiple queues may involve multiple VM exits (i.e., a VM exit for each of the multiple queues). The multiple exits performed in such systems typically significantly increase the overhead associated with communications relating to the exiting process.